package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName("t_orderInfo")
public class OrderInfoBean {
    //明细id
    @TableId(value = "pk_orderInfoId",type = IdType.AUTO)
    private  Integer id;
    //所属订单号
    @TableField("fk_orderId")
    private  Integer orderId;
    //商品对象
    @TableField(exist = false)
    private  ProductBean product;
    //商品总数
    @TableField("oI_num")
    private  Integer num;

    @Override
    public String toString() {
        return "OrderInfoBean{" +
                "id=" + id +
                ", orderId=" + orderId +
                ", product=" + product +
                ", num=" + num +
                "}\n";
    }

    public OrderInfoBean(Integer orderId, ProductBean product, Integer num) {
        this.orderId = orderId;
        this.product = product;
        this.num = num;
    }

    public OrderInfoBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }
}
